package com.baizhi.controller;


import com.baizhi.common.R;
import com.baizhi.entity.CmfzRole;
import com.baizhi.service.CmfzRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ljh
 * @since 2020-08-30
 */
@RestController
@RequestMapping("/cmfzRole")
public class CmfzRoleController {

    @Autowired
    private CmfzRoleService cmfzRoleService;

    @ResponseBody
    @RequestMapping("/selectAllRole")
    public R selectAllRole(){
        List<CmfzRole> roles= cmfzRoleService.selectAllRole();
        return R.ok().put("data",roles);
    }
}
